package gao.xiaolei.copyDao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import gao.xiaolei.copyEntity.TestRunLogCopy;

import java.util.List;

@Repository("TestRunLogCopyDao")
public interface TestRunLogCopyDao extends JpaRepository<TestRunLogCopy,String> {
    public List<TestRunLogCopy> findAllByTestRunIdOrderByCreateDateDesc(String testRunId);

    @Query("select id from TestRunLogCopy where testRunId in:testRunIds ")
    public List<String> findIdsByTestRunIdIn(@Param("testRunIds") List<String> testRunIds);

    public void deleteAllByTestRunIdIn(List<String> testRunIds);
}
